import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:wanAndroid/res/colors.dart';

class ToastUts {
  ///显示对话框
  static Future<void> showToast(BuildContext buildContext, {String text = ""}) {
    Fluttertoast.showToast(
        msg: text,
        toastLength: Toast.LENGTH_SHORT,
        gravity: ToastGravity.SNACKBAR,
        timeInSecForIosWeb: 1,
        backgroundColor: ResColors.primaryFontColor,
        textColor: Colors.white,
        fontSize: 16.0);
  }
}
